//package top.fangw.common.mybatis.config;
//
//import com.baomidou.dynamic.datasource.DynamicRoutingDataSource;
//import com.baomidou.dynamic.datasource.creator.DataSourceProperty;
//import com.baomidou.dynamic.datasource.creator.hikaricp.HikariDataSourceCreator;
//import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceAutoConfiguration;
//import jakarta.annotation.Resource;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.boot.SpringBootConfiguration;
//import org.springframework.boot.autoconfigure.AutoConfigureAfter;
//import org.springframework.boot.autoconfigure.AutoConfigureBefore;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.context.annotation.Primary;
//
//import javax.sql.DataSource;
//
///**
// * @author: xxx
// * @Date: 2021/9/7 14:36
// * @Description:
// */
//@Configuration
//public class DataSourcesConfig {
//
//
//
//    @Resource
//    private DynamicRoutingDataSource dataSource;
//
//
//
////    @Bean
////    public DynamicDataSourceProvider dynamicDataSourceProvider() {
////        return new AbstractDataSourceProvider() {
////            @Override
////            public Map<String, DataSource> loadDataSources() {
////                Map<String, DataSource> dataSourceMap = new HashMap<>(2);
////                dataSourceMap.put("sharding", shardingDataSource);
////                return dataSourceMap;
////            }
////        };
////    }
//
//    @Bean
//    @Primary
//    public DataSource dataSource() {
//        System.out.println("dataSource = " + dataSource);
//        return null;
//    }
//
//
//}
